
package TokensDelLenguaje;

import java.util.ArrayList;

public class Token_Print extends Token{
    
    public Token_Print (){
        super(Tokens.rsv_print);
    }
    
    @Override
   public String toString(){
       return ("[ Print ]");
   } 
    
    public ArrayList traducir_assembler(Token o1){
        ArrayList list = new ArrayList();
        String s = "";
        s += "invoke MessageBox, NULL, addr " + ((Token_Cadena)o1).getNombre() + ", addr " + ((Token_Cadena)o1).getNombre() + ", MB_OK\n";
       /* s += "mov dx, offset " + ((Token_Cadena)o1).getNombre() + "\n";
        s += "mov ah, 09h" + "\n";
        s += "int 21h" + "\n";*/
        //s += "invoke MessageBox, NULL, addr " + ((Token_Cadena)o1).getNombre() + ", addr " + ((Token_Cadena)o1).getNombre() + ", MB_OK\n";
        list.add(true);
        list.add(s);
        return list;
    }
}
